Optimal. Leaf size=33 \[ \frac {\cos (x)}{3 (a+a \sin (x))^2}-\frac {2 \cos (x)}{3 \left (a^2+a^2 \sin (x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2829, 2727}
\begin {gather*} \frac {\cos (x)}{3 (a \sin (x)+a)^2}-\frac {2 \cos (x)}{3 \left (a^2 \sin (x)+a^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2829
Rubi steps
\begin {align*} \int \frac {\sin (x)}{(a+a \sin (x))^2} \, dx &=\frac {\cos (x)}{3 (a+a \sin (x))^2}+\frac {2 \int \frac {1}{a+a \sin (x)} \, dx}{3 a}\\ &=\frac {\cos (x)}{3 (a+a \sin (x))^2}-\frac {2 \cos (x)}{3 \left (a^2+a^2 \sin (x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 29, normalized size = 0.88 \begin {gather*} -\frac {-3+\cos (x)+\cos (2 x)-4 \sin (x)+\sin (2 x)}{3 a^2 (1+\sin (x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 27, normalized size = 0.82
method | result | size |
default | \(\frac {\frac {4}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {2}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}}{a^{2}}\) | \(27\) |
risch | \(-\frac {2 \left (3 i {\mathrm e}^{i x}+3 \,{\mathrm e}^{2 i x}-2\right )}{3 \left ({\mathrm e}^{i x}+i\right )^{3} a^{2}}\) | \(33\) |
norman | \(\frac {-\frac {2 \tan \left (\frac {x}{2}\right )}{a}-\frac {2}{3 a}-\frac {2 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{a}-\frac {2 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{3 a}}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right ) \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}\) | \(60\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 62 vs.
\(2 (29) = 58\).
time = 0.40, size = 62, normalized size = 1.88 \begin {gather*} -\frac {2 \, {\left (\frac {3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right )}}{3 \, {\left (a^{2} + \frac {3 \, a^{2} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {3 \, a^{2} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 60 vs.
\(2 (29) = 58\).
time = 0.35, size = 60, normalized size = 1.82 \begin {gather*} \frac {2 \, \cos \left (x\right )^{2} + {\left (2 \, \cos \left (x\right ) + 1\right )} \sin \left (x\right ) + \cos \left (x\right ) - 1}{3 \, {\left (a^{2} \cos \left (x\right )^{2} - a^{2} \cos \left (x\right ) - 2 \, a^{2} - {\left (a^{2} \cos \left (x\right ) + 2 \, a^{2}\right )} \sin \left (x\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs.
\(2 (31) = 62\).
time = 0.77, size = 87, normalized size = 2.64 \begin {gather*} - \frac {6 \tan {\left (\frac {x}{2} \right )}}{3 a^{2} \tan ^{3}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan {\left (\frac {x}{2} \right )} + 3 a^{2}} - \frac {2}{3 a^{2} \tan ^{3}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + 9 a^{2} \tan {\left (\frac {x}{2} \right )} + 3 a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 21, normalized size = 0.64 \begin {gather*} -\frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{3 \, a^{2} {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.30, size = 21, normalized size = 0.64 \begin {gather*} -\frac {2\,\left (3\,\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}{3\,a^2\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________